/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * 分布式数据库Clickhouse
 * 分布式数据库Clickhouse
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Clickhouse.Apis;
using JDCloudSDK.Clickhouse.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Clickhouse.Client
{
    /// <summary>
    ///  分布式数据库Clickhouse
    ///  分布式数据库Clickhouse
    ///  Clickhouse Api 客户端
    ///</summary>
    public class ClickhouseClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private ClickhouseClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public ClickhouseClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public ClickhouseClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public ClickhouseClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.8
        ///</summary>
        public const string ClientVersion = "1.2.8";

        private const string apiVersion = "v1";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "clickhouse.jdcloud-api.com";
        private const string serviceName = "clickhouse";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  获取某个实例下的所有节点对应的域名信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDomainNamesResponse DescribeDomainNames(DescribeDomainNamesRequest request) {
            return  new DescribeDomainNamesExecutor().Client(this).Execute<DescribeDomainNamesResponse, DescribeDomainNamesResult, DescribeDomainNamesRequest>(request);
        }
#else
        /// <summary>
        ///  获取某个实例下的所有节点对应的域名信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDomainNamesResponse> DescribeDomainNames(DescribeDomainNamesRequest request) {
            return await new DescribeDomainNamesExecutor().Client(this).Execute<DescribeDomainNamesResponse, DescribeDomainNamesResult, DescribeDomainNamesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建一个Clickhouse账号
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateAccountResponse CreateAccount(CreateAccountRequest request) {
            return  new CreateAccountExecutor().Client(this).Execute<CreateAccountResponse, CreateAccountResult, CreateAccountRequest>(request);
        }
#else
        /// <summary>
        ///  创建一个Clickhouse账号
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateAccountResponse> CreateAccount(CreateAccountRequest request) {
            return await new CreateAccountExecutor().Client(this).Execute<CreateAccountResponse, CreateAccountResult, CreateAccountRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询实例列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeInstancesResponse DescribeInstances(DescribeInstancesRequest request) {
            return  new DescribeInstancesExecutor().Client(this).Execute<DescribeInstancesResponse, DescribeInstancesResult, DescribeInstancesRequest>(request);
        }
#else
        /// <summary>
        ///  查询实例列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeInstancesResponse> DescribeInstances(DescribeInstancesRequest request) {
            return await new DescribeInstancesExecutor().Client(this).Execute<DescribeInstancesResponse, DescribeInstancesResult, DescribeInstancesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  集群版本升级。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpgradeEngineVersionResponse UpgradeEngineVersion(UpgradeEngineVersionRequest request) {
            return  new UpgradeEngineVersionExecutor().Client(this).Execute<UpgradeEngineVersionResponse, UpgradeEngineVersionResult, UpgradeEngineVersionRequest>(request);
        }
#else
        /// <summary>
        ///  集群版本升级。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpgradeEngineVersionResponse> UpgradeEngineVersion(UpgradeEngineVersionRequest request) {
            return await new UpgradeEngineVersionExecutor().Client(this).Execute<UpgradeEngineVersionResponse, UpgradeEngineVersionResult, UpgradeEngineVersionRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  提交并修改实例的配置参数。 参数修改后，需要重启才能生效。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyParametersResponse ModifyParameters(ModifyParametersRequest request) {
            return  new ModifyParametersExecutor().Client(this).Execute<ModifyParametersResponse, ModifyParametersResult, ModifyParametersRequest>(request);
        }
#else
        /// <summary>
        ///  提交并修改实例的配置参数。 参数修改后，需要重启才能生效。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyParametersResponse> ModifyParameters(ModifyParametersRequest request) {
            return await new ModifyParametersExecutor().Client(this).Execute<ModifyParametersResponse, ModifyParametersResult, ModifyParametersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  当实例不欠费了或者续费了，开启Clickhouse实例的网络访问功能。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AttachNetworkResponse AttachNetwork(AttachNetworkRequest request) {
            return  new AttachNetworkExecutor().Client(this).Execute<AttachNetworkResponse, AttachNetworkResult, AttachNetworkRequest>(request);
        }
#else
        /// <summary>
        ///  当实例不欠费了或者续费了，开启Clickhouse实例的网络访问功能。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AttachNetworkResponse> AttachNetwork(AttachNetworkRequest request) {
            return await new AttachNetworkExecutor().Client(this).Execute<AttachNetworkResponse, AttachNetworkResult, AttachNetworkRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查看实例当前的备份备份策略。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribePodMapResponse DescribePodMap(DescribePodMapRequest request) {
            return  new DescribePodMapExecutor().Client(this).Execute<DescribePodMapResponse, DescribePodMapResult, DescribePodMapRequest>(request);
        }
#else
        /// <summary>
        ///  查看实例当前的备份备份策略。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribePodMapResponse> DescribePodMap(DescribePodMapRequest request) {
            return await new DescribePodMapExecutor().Client(this).Execute<DescribePodMapResponse, DescribePodMapResult, DescribePodMapRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除白名单分组。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteWhiteListGroupResponse DeleteWhiteListGroup(DeleteWhiteListGroupRequest request) {
            return  new DeleteWhiteListGroupExecutor().Client(this).Execute<DeleteWhiteListGroupResponse, DeleteWhiteListGroupResult, DeleteWhiteListGroupRequest>(request);
        }
#else
        /// <summary>
        ///  删除白名单分组。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteWhiteListGroupResponse> DeleteWhiteListGroup(DeleteWhiteListGroupRequest request) {
            return await new DeleteWhiteListGroupExecutor().Client(this).Execute<DeleteWhiteListGroupResponse, DeleteWhiteListGroupResult, DeleteWhiteListGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  关闭实例的外网访问功能。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DisableInternetAccessResponse DisableInternetAccess(DisableInternetAccessRequest request) {
            return  new DisableInternetAccessExecutor().Client(this).Execute<DisableInternetAccessResponse, DisableInternetAccessResult, DisableInternetAccessRequest>(request);
        }
#else
        /// <summary>
        ///  关闭实例的外网访问功能。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DisableInternetAccessResponse> DisableInternetAccess(DisableInternetAccessRequest request) {
            return await new DisableInternetAccessExecutor().Client(this).Execute<DisableInternetAccessResponse, DisableInternetAccessResult, DisableInternetAccessRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取当前用户可用的可用区
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AzsResponse Azs(AzsRequest request) {
            return  new AzsExecutor().Client(this).Execute<AzsResponse, AzsResult, AzsRequest>(request);
        }
#else
        /// <summary>
        ///  获取当前用户可用的可用区
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AzsResponse> Azs(AzsRequest request) {
            return await new AzsExecutor().Client(this).Execute<AzsResponse, AzsResult, AzsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 Clickhouse 推荐规格
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDefaultConfigResponse DescribeDefaultConfig(DescribeDefaultConfigRequest request) {
            return  new DescribeDefaultConfigExecutor().Client(this).Execute<DescribeDefaultConfigResponse, DescribeDefaultConfigResult, DescribeDefaultConfigRequest>(request);
        }
#else
        /// <summary>
        ///  查询 Clickhouse 推荐规格
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDefaultConfigResponse> DescribeDefaultConfig(DescribeDefaultConfigRequest request) {
            return await new DescribeDefaultConfigExecutor().Client(this).Execute<DescribeDefaultConfigResponse, DescribeDefaultConfigResult, DescribeDefaultConfigRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  强行删除DRDS实例，包括包年包月未过期实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteInstanceByForceResponse DeleteInstanceByForce(DeleteInstanceByForceRequest request) {
            return  new DeleteInstanceByForceExecutor().Client(this).Execute<DeleteInstanceByForceResponse, DeleteInstanceByForceResult, DeleteInstanceByForceRequest>(request);
        }
#else
        /// <summary>
        ///  强行删除DRDS实例，包括包年包月未过期实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteInstanceByForceResponse> DeleteInstanceByForce(DeleteInstanceByForceRequest request) {
            return await new DeleteInstanceByForceExecutor().Client(this).Execute<DeleteInstanceByForceResponse, DeleteInstanceByForceResult, DeleteInstanceByForceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除一个Clickhouse实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteInstanceResponse DeleteInstance(DeleteInstanceRequest request) {
            return  new DeleteInstanceExecutor().Client(this).Execute<DeleteInstanceResponse, DeleteInstanceResult, DeleteInstanceRequest>(request);
        }
#else
        /// <summary>
        ///  删除一个Clickhouse实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteInstanceResponse> DeleteInstance(DeleteInstanceRequest request) {
            return await new DeleteInstanceExecutor().Client(this).Execute<DeleteInstanceResponse, DeleteInstanceResult, DeleteInstanceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询k8s集群支持的集群外访问方式
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeExposeTypeResponse DescribeExposeType(DescribeExposeTypeRequest request) {
            return  new DescribeExposeTypeExecutor().Client(this).Execute<DescribeExposeTypeResponse, DescribeExposeTypeResult, DescribeExposeTypeRequest>(request);
        }
#else
        /// <summary>
        ///  查询k8s集群支持的集群外访问方式
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeExposeTypeResponse> DescribeExposeType(DescribeExposeTypeRequest request) {
            return await new DescribeExposeTypeExecutor().Client(this).Execute<DescribeExposeTypeResponse, DescribeExposeTypeResult, DescribeExposeTypeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 Clickhouse account列表信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAccountsResponse DescribeAccounts(DescribeAccountsRequest request) {
            return  new DescribeAccountsExecutor().Client(this).Execute<DescribeAccountsResponse, DescribeAccountsResult, DescribeAccountsRequest>(request);
        }
#else
        /// <summary>
        ///  查询 Clickhouse account列表信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAccountsResponse> DescribeAccounts(DescribeAccountsRequest request) {
            return await new DescribeAccountsExecutor().Client(this).Execute<DescribeAccountsResponse, DescribeAccountsResult, DescribeAccountsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 Clickhouse 集群进度
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeProgressResponse DescribeProgress(DescribeProgressRequest request) {
            return  new DescribeProgressExecutor().Client(this).Execute<DescribeProgressResponse, DescribeProgressResult, DescribeProgressRequest>(request);
        }
#else
        /// <summary>
        ///  查询 Clickhouse 集群进度
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeProgressResponse> DescribeProgress(DescribeProgressRequest request) {
            return await new DescribeProgressExecutor().Client(this).Execute<DescribeProgressResponse, DescribeProgressResult, DescribeProgressRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  关闭数据库的云盘扩容功能
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DisableCloudDiskCapacityResponse DisableCloudDiskCapacity(DisableCloudDiskCapacityRequest request) {
            return  new DisableCloudDiskCapacityExecutor().Client(this).Execute<DisableCloudDiskCapacityResponse, DisableCloudDiskCapacityResult, DisableCloudDiskCapacityRequest>(request);
        }
#else
        /// <summary>
        ///  关闭数据库的云盘扩容功能
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DisableCloudDiskCapacityResponse> DisableCloudDiskCapacity(DisableCloudDiskCapacityRequest request) {
            return await new DisableCloudDiskCapacityExecutor().Client(this).Execute<DisableCloudDiskCapacityResponse, DisableCloudDiskCapacityResult, DisableCloudDiskCapacityRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取当前用户售罄信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public OrderableInstanceTypeResponse OrderableInstanceType(OrderableInstanceTypeRequest request) {
            return  new OrderableInstanceTypeExecutor().Client(this).Execute<OrderableInstanceTypeResponse, OrderableInstanceTypeResult, OrderableInstanceTypeRequest>(request);
        }
#else
        /// <summary>
        ///  获取当前用户售罄信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<OrderableInstanceTypeResponse> OrderableInstanceType(OrderableInstanceTypeRequest request) {
            return await new OrderableInstanceTypeExecutor().Client(this).Execute<OrderableInstanceTypeResponse, OrderableInstanceTypeResult, OrderableInstanceTypeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  开启实例的外网访问功能。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public EnableInternetAccessResponse EnableInternetAccess(EnableInternetAccessRequest request) {
            return  new EnableInternetAccessExecutor().Client(this).Execute<EnableInternetAccessResponse, EnableInternetAccessResult, EnableInternetAccessRequest>(request);
        }
#else
        /// <summary>
        ///  开启实例的外网访问功能。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<EnableInternetAccessResponse> EnableInternetAccess(EnableInternetAccessRequest request) {
            return await new EnableInternetAccessExecutor().Client(this).Execute<EnableInternetAccessResponse, EnableInternetAccessResult, EnableInternetAccessRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 Clickhouse 节点信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeNodesResponse DescribeNodes(DescribeNodesRequest request) {
            return  new DescribeNodesExecutor().Client(this).Execute<DescribeNodesResponse, DescribeNodesResult, DescribeNodesRequest>(request);
        }
#else
        /// <summary>
        ///  查询 Clickhouse 节点信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeNodesResponse> DescribeNodes(DescribeNodesRequest request) {
            return await new DescribeNodesExecutor().Client(this).Execute<DescribeNodesResponse, DescribeNodesResult, DescribeNodesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  根据实例的的id，获取实例相关信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SelectDetailListResponse SelectDetailList(SelectDetailListRequest request) {
            return  new SelectDetailListExecutor().Client(this).Execute<SelectDetailListResponse, SelectDetailListResult, SelectDetailListRequest>(request);
        }
#else
        /// <summary>
        ///  根据实例的的id，获取实例相关信息。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SelectDetailListResponse> SelectDetailList(SelectDetailListRequest request) {
            return await new SelectDetailListExecutor().Client(this).Execute<SelectDetailListResponse, SelectDetailListResult, SelectDetailListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  开启数据库的云盘扩容功能
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public EnableCloudDiskCapacityResponse EnableCloudDiskCapacity(EnableCloudDiskCapacityRequest request) {
            return  new EnableCloudDiskCapacityExecutor().Client(this).Execute<EnableCloudDiskCapacityResponse, EnableCloudDiskCapacityResult, EnableCloudDiskCapacityRequest>(request);
        }
#else
        /// <summary>
        ///  开启数据库的云盘扩容功能
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<EnableCloudDiskCapacityResponse> EnableCloudDiskCapacity(EnableCloudDiskCapacityRequest request) {
            return await new EnableCloudDiskCapacityExecutor().Client(this).Execute<EnableCloudDiskCapacityResponse, EnableCloudDiskCapacityResult, EnableCloudDiskCapacityRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 Clickhouse 实例的详细信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeInstanceAttributesResponse DescribeInstanceAttributes(DescribeInstanceAttributesRequest request) {
            return  new DescribeInstanceAttributesExecutor().Client(this).Execute<DescribeInstanceAttributesResponse, DescribeInstanceAttributesResult, DescribeInstanceAttributesRequest>(request);
        }
#else
        /// <summary>
        ///  查询 Clickhouse 实例的详细信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeInstanceAttributesResponse> DescribeInstanceAttributes(DescribeInstanceAttributesRequest request) {
            return await new DescribeInstanceAttributesExecutor().Client(this).Execute<DescribeInstanceAttributesResponse, DescribeInstanceAttributesResult, DescribeInstanceAttributesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改实例名称。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyInstanceNameResponse ModifyInstanceName(ModifyInstanceNameRequest request) {
            return  new ModifyInstanceNameExecutor().Client(this).Execute<ModifyInstanceNameResponse, ModifyInstanceNameResult, ModifyInstanceNameRequest>(request);
        }
#else
        /// <summary>
        ///  修改实例名称。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyInstanceNameResponse> ModifyInstanceName(ModifyInstanceNameRequest request) {
            return await new ModifyInstanceNameExecutor().Client(this).Execute<ModifyInstanceNameResponse, ModifyInstanceNameResult, ModifyInstanceNameRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 node 可用规格
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeNodeClassesResponse DescribeNodeClasses(DescribeNodeClassesRequest request) {
            return  new DescribeNodeClassesExecutor().Client(this).Execute<DescribeNodeClassesResponse, DescribeNodeClassesResult, DescribeNodeClassesRequest>(request);
        }
#else
        /// <summary>
        ///  查询 node 可用规格
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeNodeClassesResponse> DescribeNodeClasses(DescribeNodeClassesRequest request) {
            return await new DescribeNodeClassesExecutor().Client(this).Execute<DescribeNodeClassesResponse, DescribeNodeClassesResult, DescribeNodeClassesRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 Clickhouse audit列表信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAuditResultResponse DescribeAuditResult(DescribeAuditResultRequest request) {
            return  new DescribeAuditResultExecutor().Client(this).Execute<DescribeAuditResultResponse, DescribeAuditResultResult, DescribeAuditResultRequest>(request);
        }
#else
        /// <summary>
        ///  查询 Clickhouse audit列表信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAuditResultResponse> DescribeAuditResult(DescribeAuditResultRequest request) {
            return await new DescribeAuditResultExecutor().Client(this).Execute<DescribeAuditResultResponse, DescribeAuditResultResult, DescribeAuditResultRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查看JCHDB实例的配置参数。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeParametersResponse DescribeParameters(DescribeParametersRequest request) {
            return  new DescribeParametersExecutor().Client(this).Execute<DescribeParametersResponse, DescribeParametersResult, DescribeParametersRequest>(request);
        }
#else
        /// <summary>
        ///  查看JCHDB实例的配置参数。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeParametersResponse> DescribeParameters(DescribeParametersRequest request) {
            return await new DescribeParametersExecutor().Client(this).Execute<DescribeParametersResponse, DescribeParametersResult, DescribeParametersRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改允许访问实例的IP白名单。白名单是允许访问当前实例的IP/IP段列表，缺省情况下，白名单对本VPC开放。如果用户开启了外网访问的功能，还需要对外网的IP配置白名单。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyWhiteListResponse ModifyWhiteList(ModifyWhiteListRequest request) {
            return  new ModifyWhiteListExecutor().Client(this).Execute<ModifyWhiteListResponse, ModifyWhiteListResult, ModifyWhiteListRequest>(request);
        }
#else
        /// <summary>
        ///  修改允许访问实例的IP白名单。白名单是允许访问当前实例的IP/IP段列表，缺省情况下，白名单对本VPC开放。如果用户开启了外网访问的功能，还需要对外网的IP配置白名单。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyWhiteListResponse> ModifyWhiteList(ModifyWhiteListRequest request) {
            return await new ModifyWhiteListExecutor().Client(this).Execute<ModifyWhiteListResponse, ModifyWhiteListResult, ModifyWhiteListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查询 Clickhouse audit列表信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeSlowlogResultResponse DescribeSlowlogResult(DescribeSlowlogResultRequest request) {
            return  new DescribeSlowlogResultExecutor().Client(this).Execute<DescribeSlowlogResultResponse, DescribeSlowlogResultResult, DescribeSlowlogResultRequest>(request);
        }
#else
        /// <summary>
        ///  查询 Clickhouse audit列表信息
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeSlowlogResultResponse> DescribeSlowlogResult(DescribeSlowlogResultRequest request) {
            return await new DescribeSlowlogResultExecutor().Client(this).Execute<DescribeSlowlogResultResponse, DescribeSlowlogResultResult, DescribeSlowlogResultRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  重置数据库账号密码
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ResetPasswordResponse ResetPassword(ResetPasswordRequest request) {
            return  new ResetPasswordExecutor().Client(this).Execute<ResetPasswordResponse, ResetPasswordResult, ResetPasswordRequest>(request);
        }
#else
        /// <summary>
        ///  重置数据库账号密码
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ResetPasswordResponse> ResetPassword(ResetPasswordRequest request) {
            return await new ResetPasswordExecutor().Client(this).Execute<ResetPasswordResponse, ResetPasswordResult, ResetPasswordRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  内部查询实例状态
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public InternalDescribeInstanceResponse InternalDescribeInstance(InternalDescribeInstanceRequest request) {
            return  new InternalDescribeInstanceExecutor().Client(this).Execute<InternalDescribeInstanceResponse, InternalDescribeInstanceResult, InternalDescribeInstanceRequest>(request);
        }
#else
        /// <summary>
        ///  内部查询实例状态
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<InternalDescribeInstanceResponse> InternalDescribeInstance(InternalDescribeInstanceRequest request) {
            return await new InternalDescribeInstanceExecutor().Client(this).Execute<InternalDescribeInstanceResponse, InternalDescribeInstanceResult, InternalDescribeInstanceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  查看实例当前白名单。白名单是允许访问当前实例的IP/IP段列表，缺省情况下，白名单对本VPC开放。如果用户开启了外网访问的功能，还需要对外网的IP配置白名单。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeWhiteListResponse DescribeWhiteList(DescribeWhiteListRequest request) {
            return  new DescribeWhiteListExecutor().Client(this).Execute<DescribeWhiteListResponse, DescribeWhiteListResult, DescribeWhiteListRequest>(request);
        }
#else
        /// <summary>
        ///  查看实例当前白名单。白名单是允许访问当前实例的IP/IP段列表，缺省情况下，白名单对本VPC开放。如果用户开启了外网访问的功能，还需要对外网的IP配置白名单。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeWhiteListResponse> DescribeWhiteList(DescribeWhiteListRequest request) {
            return await new DescribeWhiteListExecutor().Client(this).Execute<DescribeWhiteListResponse, DescribeWhiteListResult, DescribeWhiteListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  增加白名单分组。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddWhiteListGroupResponse AddWhiteListGroup(AddWhiteListGroupRequest request) {
            return  new AddWhiteListGroupExecutor().Client(this).Execute<AddWhiteListGroupResponse, AddWhiteListGroupResult, AddWhiteListGroupRequest>(request);
        }
#else
        /// <summary>
        ///  增加白名单分组。
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddWhiteListGroupResponse> AddWhiteListGroup(AddWhiteListGroupRequest request) {
            return await new AddWhiteListGroupExecutor().Client(this).Execute<AddWhiteListGroupResponse, AddWhiteListGroupResult, AddWhiteListGroupRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  当实例欠费或者到期了，关闭Clickhouse实例的网络访问功能
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DetachNetworkResponse DetachNetwork(DetachNetworkRequest request) {
            return  new DetachNetworkExecutor().Client(this).Execute<DetachNetworkResponse, DetachNetworkResult, DetachNetworkRequest>(request);
        }
#else
        /// <summary>
        ///  当实例欠费或者到期了，关闭Clickhouse实例的网络访问功能
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DetachNetworkResponse> DetachNetwork(DetachNetworkRequest request) {
            return await new DetachNetworkExecutor().Client(this).Execute<DetachNetworkResponse, DetachNetworkResult, DetachNetworkRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改账号权限
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyPrivilegeResponse ModifyPrivilege(ModifyPrivilegeRequest request) {
            return  new ModifyPrivilegeExecutor().Client(this).Execute<ModifyPrivilegeResponse, ModifyPrivilegeResult, ModifyPrivilegeRequest>(request);
        }
#else
        /// <summary>
        ///  修改账号权限
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyPrivilegeResponse> ModifyPrivilege(ModifyPrivilegeRequest request) {
            return await new ModifyPrivilegeExecutor().Client(this).Execute<ModifyPrivilegeResponse, ModifyPrivilegeResult, ModifyPrivilegeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除一个Clickhouse实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteAccountResponse DeleteAccount(DeleteAccountRequest request) {
            return  new DeleteAccountExecutor().Client(this).Execute<DeleteAccountResponse, DeleteAccountResult, DeleteAccountRequest>(request);
        }
#else
        /// <summary>
        ///  删除一个Clickhouse实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteAccountResponse> DeleteAccount(DeleteAccountRequest request) {
            return await new DeleteAccountExecutor().Client(this).Execute<DeleteAccountResponse, DeleteAccountResult, DeleteAccountRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建一个Clickhouse实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateInstanceResponse CreateInstance(CreateInstanceRequest request) {
            return  new CreateInstanceExecutor().Client(this).Execute<CreateInstanceResponse, CreateInstanceResult, CreateInstanceRequest>(request);
        }
#else
        /// <summary>
        ///  创建一个Clickhouse实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateInstanceResponse> CreateInstance(CreateInstanceRequest request) {
            return await new CreateInstanceExecutor().Client(this).Execute<CreateInstanceResponse, CreateInstanceResult, CreateInstanceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  Clickhouse实例变配
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyInstanceSpecResponse ModifyInstanceSpec(ModifyInstanceSpecRequest request) {
            return  new ModifyInstanceSpecExecutor().Client(this).Execute<ModifyInstanceSpecResponse, ModifyInstanceSpecResult, ModifyInstanceSpecRequest>(request);
        }
#else
        /// <summary>
        ///  Clickhouse实例变配
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyInstanceSpecResponse> ModifyInstanceSpec(ModifyInstanceSpecRequest request) {
            return await new ModifyInstanceSpecExecutor().Client(this).Execute<ModifyInstanceSpecResponse, ModifyInstanceSpecResult, ModifyInstanceSpecRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认ClickhouseClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>clickhouseClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>clickhouseClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>clickhouseClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造ClickhouseClient 对象
                ///</summary>
                ClickhouseClient Build();
            }

            /// <summary>
            ///  默认ClickhouseClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  ClickhouseClient service client
                /// </summary>
                private  ClickhouseClient clickhouseClient;

                /// <summary>
                ///  默认ClickhouseClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    clickhouseClient = new ClickhouseClient();
                }

                /// <summary>
                ///  构造ClickhouseClient 对象
                ///</summary>
                public ClickhouseClient Build()
                {
                    if (clickhouseClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        clickhouseClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (clickhouseClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("ClickhouseClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (clickhouseClient.HttpRequestConfig == null)
                    {
                        clickhouseClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (clickhouseClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("ClickhouseClient build error: http request config not set");
                        }
                    }
                    return clickhouseClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>clickhouseClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    clickhouseClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>clickhouseClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    clickhouseClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>clickhouseClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    clickhouseClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
